<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
                <g:if test="${Protein.uniprot!=null}">
                  <title>Protein ${UniprotName} (${Protein.mainId })</title>
                </g:if>
                <g:else>
                 <title>Protein ${Protein.mainId }</title>
                </g:else>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
		<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
		<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css', file: 'protein.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css/lorikeet', file: 'lorikeet.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css', file: 'proteinRegulationForm.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css', file: 'proteinRegulationPlots.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css', file: 'infoBox.css')}" type="text/css">
                <link rel="stylesheet" href="${resource(dir: 'css', file: 'jquery.dataTables.css')}" type="text/css">
        <g:javascript library="jquery" />

        <r:layoutResources />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
        <g:javascript src="select2/select2.js" />
        <g:javascript src="jquery.chained.mini.js" />
        <g:javascript src="lorikeet/jquery.flot.js" />
        <g:javascript src="lorikeet/jquery.flot.selection.js" />
        <g:javascript src="lorikeet/specview.js" />
        <g:javascript src="lorikeet/peptide.js" />
        <g:javascript src="lorikeet/aminoacid.js" />
        <g:javascript src="lorikeet/ion.js" />
        <g:javascript src="jquery.dataTables.min.js" />
        <g:javascript src="ColReorder.min.js" />
        <g:javascript src="ColVis.min.js" />
        <g:javascript src="protein.js" />
  </head>
  <body>
    <g:render template="/main/header" />
    <div class="protein">
      <g:if test="${UniprotName!=null}">
        <h1>Protein: ${UniprotName} (${Protein.mainId })</h1>
      </g:if>
      <g:else>
       <h1>Protein: ${Protein.mainId }</h1>
      </g:else>
       <div class="tabs">
         <div class="headline">
           <div class="headlineElement firstTab" id="h-details">Details</div>
           <div class="headlineElement<g:if test="${Projects==0}"> lastTab</g:if>" id="h-sequence"><g:remoteLink action="showSequence" update="sequence" params="${params}" class="h-sequence-link">Sequence</g:remoteLink></div>

           <g:if test="${Projects!=0}">
           <div class="headlineElement" id="h-proteinExpression"><g:remoteLink action="showProteinExpression" update="proteinExpression" params="${params}" class="h-proteinExpression-link">Protein Expression</g:remoteLink></div>
           <g:if test="${ShowExpressionProfileTab}"><div class="headlineElement" id="h-proteinRegulation"><g:remoteLink action="showProteinRegulation" update="proteinRegulation" params="${params}" class="h-proteinRegulation-link">Comparative Expression</g:remoteLink></div></g:if>
           <div class="headlineElement" id="h-sequenceCoverage"><g:remoteLink action="showSequenceCoverage" update="sequenceCoverage" params="${params}" class="h-sequenceCoverage-link">Peptide Map</g:remoteLink></div>
           <div class="headlineElement" id="h-peptides"><g:remoteLink action="peptides" update="peptides" params="${params}" class="h-peptides-link">Peptides</g:remoteLink></div>
           <div class="headlineElement lastTab" id="h-msmsSpectra"><g:remoteLink action="showMsMsSpectra" update="msmsSpectra" params="${params}" class="h-msmsSpectra-link">MS/MS Spectra</g:remoteLink></div>
           </g:if>
         </div>
           <div class="tab-content" id="details">
             <div class="description element">
               <div class="label">Description</div>
               <div class="content">
                 <span class="property-value">${Protein.description }</span>
               </div>
             </div>
             
             <g:if test="${Uniprot!=null}">
               <div class="UniprotProtein element">
                 <div class="label">Protein Names</div>
                 <div class="content">
                     <div class="recName">
                       <div class="recLabel">Recommended name:</div>
                       <div class="fullName">${Uniprot.fullName}</div>
                       <div class="shortNames">
                        <g:each in="${Uniprot.shortNames.sort{it.name}}">
                          <div class="shortName">Short name: ${it.name}</div>
                        </g:each>
                       </div>
                       <div class="ecs">
                        <g:each in="${Uniprot.ecs}">
                          <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                        </g:each>
                       </div>
                     </div>
                     <g:if test="${Uniprot.altNames.size()!=0}">
                       <div class="altLabel">Alternative name(s):</div>
                     </g:if>
                     <g:each in="${Uniprot.altNames.sort(){it.fullName}}" var="altName">
                       <div class="altName">
                         <div class="fullName">${altName.fullName}</div>
                         <div class="shortNames">
                          <g:each in="${altName.shortNames.sort{it.name}}">
                            <div class="shortName">Short name: ${it.name}</div>
                          </g:each>
                         </div>
                         <div class="ecs">
                          <g:each in="${altName.ecs}">
                          <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                        </g:each>
                         </div>
                       </div>
                     </g:each>
                     <g:if test="${Uniprot.contains.size()!=0}">
                       <div class="contains">
                       <div class="containLabel">Cleaved into the following chain:</div>
                         <g:each in="${Uniprot.contains}" var="contain">
                           <div class="contain">
                             <div class="recName">
                               <div class="fullName">${contain.fullName}</div>
                               <div class="shortNames">
                                <g:each in="${contain.shortNames.sort{it.name}}">
                                  <div class="shortName">Short name: ${it.name}</div>
                                </g:each>
                               </div>
                               <div class="ecs">
                                <g:each in="${contain.ecs}">
                                  <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                                </g:each>
                               </div>
                             </div>
                             <g:each in="${contain.altNames}" var="altName">
                               <div class="altName">
                                 <div class="fullName">${altName.fullName}</div>
                                 <div class="shortNames">
                                  <g:each in="${altName.shortNames.sort{it.name}}">
                                    <div class="shortName">Short name: ${it.name}</div>
                                  </g:each>
                                 </div>
                                 <div class="ecs">
                                  <g:each in="${altName.ecs}">
                                    <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                                  </g:each>
                                 </div>
                               </div>
                             </g:each>
                           </div>
                         </g:each>
                       </div>
                     </g:if>
                     <g:if test="${Uniprot.includes.size()!=0}">
                       <div class="includes">
                       <div class="includeLabel">Includes the following 2 domains:</div>
                          <g:set var="index" value="${1}" />
                         <g:each in="${Uniprot.includes.sort{it.id}}" var="include">
                           <div class="include">
                             <div class="recName">
                               <div class="fullName">${index}. ${include.fullName}</div>
                               <g:set var="index" value="${index+1}" />
                               <div class="shortNames">
                                <g:each in="${include.shortNames.sort{it.name}}">
                                  <div class="shortName">Short name: ${it.name}</div>
                                </g:each>
                               </div>
                               <div class="ecs">
                                <g:each in="${include.ecs}">
                                  <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                                </g:each>
                               </div>
                             </div>
                             <g:each in="${include.altNames}" var="altName">
                               <div class="altName">
                                 <div class="fullName">${altName.fullName}</div>
                                 <div class="shortNames">
                                  <g:each in="${altName.shortNames.sort{it.name}}">
                                    <div class="shortName">Short name: ${it.name}</div>
                                  </g:each>
                                 </div>
                                 <div class="ecs">
                                  <g:each in="${altName.ecs}">
                                    <div class="ec">EC: <a href="http://enzyme.expasy.org/EC/${it.number}" target="_blank">${it.number}</a></div>
                                  </g:each>
                                 </div>
                               </div>
                             </g:each>
                           </div>
                         </g:each>
                       </div>
                     </g:if>
                 </div>
               </div>

               <g:if test="${Uniprot.genes.size()!=0}">
                  <div class="UniprotGene element">
                     <div class="label">Gene Names</div>
                     <div class="content">
                         <g:each in="${Uniprot.genes}" var="gene">
                           <div class="gene">
                             <div class="geneNameLabel">Name:</div>
                             <div class="geneName">${gene.name}</div>
                             <g:if test="${gene.synonyms.size()!=0}">
                                <div class="synonymLabel">Synonyms:</div>
                             </g:if>
                             <g:each in="${gene.synonyms}" var="synonym">
                               <div class="synonym">${synonym.name}</div>
                             </g:each>
                           </div>
                         </g:each>
                   </div>
                 </div>
               </g:if>

               <g:if test="${Uniprot.go.size()!=0}">
                 <div class="UniprotGO UniprotGOMain element">
                     <div class="label">Gene Ontology (GO)</div>
                     <div class="content"></div>
                 </div>
                 <g:each in="${GOClasses.sort(){it.name}}" var="goClass">
                   <g:if test="${GO[goClass.letter.toString()].size()!=0}">
                     <div class="UniprotGO element">
                         <div class="label sublabel">${goClass.name}</div>
                         <div class="content">
                           <g:each in="${GO[goClass.letter.toString()]}" var="g">
                             <a href="http://www.ebi.ac.uk/QuickGO/GTerm?id=${g.identifier}" target="_blank" class="go">${g.description} (${g.identifier})</a>
                             <div class="goRef">${g.evidence.name}. Source: ${g.source}</div>
                           </g:each>
                         </div>
                     </div>
                   </g:if>
                 </g:each>
               </g:if>

             </g:if>
             <g:else>
               <g:if test="${Protein.genes.size()!=0}">
                  <div class="UniprotGene element">
                     <div class="label">Gene Names</div>
                     <div class="content">
                       <g:each in="${Protein.genes}" var="gene">
                         <div class="gene">
                           <div class="geneNameLabel">Name:</div>
                           <div class="geneName">${gene.name}</div>
                         </div>
                       </g:each>
                   </div>
                 </div>
               </g:if>
             </g:else>


             <div class="chromosome element">
               <div class="label">Chromosomes</div>
               <div class="content">
                 <g:each in="${Protein.chromosomes.sort{it.chromosome}}">
                    <g:link class="property-value" controller="ProteinChromosome" action="show" id="${it.chromosome}" params="${[organism:Protein.organism.id, chromosome:it.chromosome, markedStart:it.start, markedEnd:it.end, label:Protein.mainId]}" target="_blank">${it }</g:link>
                 </g:each>
               </div>
             </div>

             <div class="sources element">
               <div class="label">Sources</div>
               <div class="content">
                 <g:each in="${Protein.sourceReferences.sort{it.DBname}}">
                    <span class="property-value">${it.link() }</span>
                 </g:each>
               </div>
             </div>

             <g:if test="${Protein.referenceIds!=null}">
             <div class="references element">
               <div class="label">Reference Ids</div>
               <div class="content">
                 <g:each in="${Protein.referenceIds.sort{it.DBname}}">
                    <span class="property-value">${it.link() }</span>
                 </g:each>
               </div>
             </div>
             </g:if>
           </div>
           
           <div class="tab-content" id="sequence"><div class="loading">Loading...</div></div>
         
           <g:if test="${Projects!=0}">
           <div class="tab-content" id="sequenceCoverage"><div class="loading">Loading...</div></div>

           <div class="tab-content" id="peptides"><div class="loading">Loading...</div></div>
         
           <div class="tab-content" id="proteinExpression"><div class="loading">Loading...</div></div>

           <g:if test="${ShowExpressionProfileTab}"><div class="tab-content" id="proteinRegulation"><div class="loading">Loading...</div></div></g:if>

           <div class="tab-content" id="msmsSpectra"><div class="loading">Loading...</div></div>

           
           </g:if>
           
       </div>
    </div>
  </body>
</html>